package com.dsteiner.widgets.client;

import com.dsteiner.widgets.client.Widgets.IWidget;
import com.google.gwt.event.logical.shared.ResizeHandler;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.EventPreview;
import com.google.gwt.user.client.IncrementalCommand;
import com.google.gwt.user.client.WindowResizeListener;
import com.google.gwt.user.client.WindowScrollListener;
import com.google.gwt.user.client.Event.NativePreviewHandler;
import com.google.gwt.user.client.Window.ScrollHandler;

public interface IJsUtil {

	// TODO - remove dummies before alpha launch
	public static final int DEFAULT_DUMMY_USER = 4;
	public static final int PUBLIC_ACCOUNT_DUMMY_USER = 711;
	public static final int MICHAEL_DUMMY_USER = 274;
	public static final int MICHAEL_REAL_DUMMY_USER = 440;
	public static final int MIKE_DAD_DUMMY_USER = 4;
	public static final int DOM_DUMMY_USER = 187;
	
	public static final String USER_CITY = "user_city";

	public static final String USER_IP = "user_ip";

	public static final String USER_LAT = "user_lat";

	public static final String USER_LNG = "user_lng";

	public static final String USER_STATE = "user_state";

	public static final String USER_TEMP_ID = "user_temp_id";

	public static final String USER_URI = "user_uri";

	public static final String USER_CUST_ID = "user_cust_id";

	public static final String COOKIE_USER_ID = "customer_id";
	
	public static final String COOKIE_USER_TYPE = "user_type";

	public static final String COOKIE_USER_TYPE_VERIFIED = "user_verified";

	public static final String COOKIE_USER_NAME = "customer_first_name";
	
	public static final String COOKIE_USER_EMAIL = "customer_email_address";
	
	public static final String COOKIE_USER_AGENT_ID = "customers_agent_id";

	public static final String COOKIE_OFFICE_ID = "office_id";
	public static final String COOKIE_AGENT_ID = "agent_id";
	
	public static final int GET = 1;
	public static final int POST= 2;
	
	public void addWindowResizeListener(WindowResizeListener windowResizeListener);

	public void addWindowScrollListener(WindowScrollListener windowScrollListener);

	void addCommand(Command incrementalCommand);

	void addCommand(IncrementalCommand incrementalCommand);

	void addCookie(String cookieName, String value);

	void addEventPreview(EventPreview eventListener);
	
	void cancelCurrentEvent();

	String format(double number, String pattern);
	
	int getClientHeight();

	int getClientWidth();

	String getCookie(String name);

	String getDomainUrl();

	String getHref();

	String getInfoFromDiv(String divId);

	int getScrollLeft();
	
	int getScrollTop();
	
	String gup(String name);
	
	String gup(String url, String string);

	boolean isGalleryPage();

	boolean isIphoneUserAgent();

	boolean isMapPage();

	boolean isNotTemplateSite();
	
	boolean isPropertyDetailsPage();

	boolean isWwwSite();

	String md5(String lurl);

	void open(String url, String name, String features, int top, int left);

	void openWindow(String url, String name, String features);

	void removeEventPreview(EventPreview eventListener);

	void setLocation(String url);

	void setPrintableImageUrl(IWidget widget, String url);

	void setStyleAttribute(IWidget widget, String name, String value);

	void showAlert(String text);

	void trackUrchinHit(String pageName);
	
	Integer getUserId();

	String getUserType();

	boolean isUserTypeVerified(String userTypeVerified);

	String getUserName();

	String getUserEmail();

	String getUserTypeVerified();

	String getUserAgentId();

	String getUserUri();

	String getUserTempId();

	String getUserState();

	Float getUserLng();

	Float getUserLat();

	String getUserIp();

	Integer getUserCustId();

	String getUserCity();

	public Request sendRequest(String url, int method,
			RequestCallback requestCallback);

	public String encodeComponent(String arrayAsString);

	void sendRequest(int requestId, String url, ResponseHandler handler);

	public boolean isIe6();

	void addEventPreviewHander(NativePreviewHandler handler);

	boolean isAccountValidationPage();

	boolean isLoginPage();

	void addWindowResizeHandler(ResizeHandler handler);

	void removeCookie(String name);

	void trackGAVar(String varName);

	void addWindowScrollHandler(ScrollHandler handler);

	void trackEvent(String category, String action, String optionalLabel, String optionalValue);

	void trackEvent(String category, String action, String optionalLabel);

	void trackEvent(String category, String action);

	
}
